<?php 
/* @var $this Zend_View */
echo'<link rel="stylesheet" media="screen,projection,tv" href="'.$this->baseUrl('css/dataGrid/screen.css').'" type="text/css" />';
echo'<link rel="stylesheet" media="screen,projection,tv" href="'.$this->baseUrl('css/dataGrid/maite.tabella.css').'" type="text/css" />';
?>

Kontroler Crud damian
Akcja index

<script type="text/javascript">
$(document).ready(
	    function()
	    {
	       console.log('Jquery dzialanie - datagrid damian - Akcja Data Grid');
	    });
</script>
<?php 
# DATA GRID
 if( $this->paginate->success == true)  
 {  
 			$paginate=$this->paginate;
 			
            # Get the results 
            $result = $paginate->resultset->fetchAll();  
              
            echo '<table class="tabella">';
            
            echo '<tbody class="tabella-body">';
            
            # NAGŁÓWKI
            echo '<tr>
                    <th style="width: 200px;" >'.$paginate->links_html_order[0].'</th>
                    <th style="width: 200px;" >'.$paginate->links_html_order[1].'</th>
                  </tr>'; 
            
            # WIERSZE
            foreach($result as $row)  
            {  
                echo '<tr><td>'.$row['name'].'</td><td>'.$row['population'].'</td></tr>';  
            }
            
            echo '</tbody>';  
            echo '</table>';  
              
            # Show the paginated links ( 1 2 3 4 5 6 7 ) etc.  
            echo '<div class="tabella-footer">'; 
            echo $paginate->links_html;  
            echo '</div>';
              
            # Get the total number if pages if you like   
            echo '<br>Ilość stron:';   
            echo $paginate->total_pages;  
              
            # Get the total number of results if you like 
            echo '<br>Ilość wyników:'.$paginate->total_results;  
 }
 else
 {
      echo 'Błąd podczas otrzymywania danych.';
 } 
     
?>


